package com.fyd.mybatis.session.defaults;

import com.fyd.mybatis.binding.MapperRegistry;
import com.fyd.mybatis.session.Configuration;
import com.fyd.mybatis.session.SqlSession;
import com.fyd.mybatis.session.SqlSessionFactory;

/**
 * @Description
 * @Auther: fyd20
 * @Date: 2025/6/4 12:34
 * @Description: DefaultSqlSessionFactory
 * @Version 1.0.0
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {


    private final Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
